include $(TOPDIR)/rules.mk

PKG_NAME:=gmediarender
PKG_RELEASE:=1

PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING

PKG_SOURCE_URL:=https://github.com/hzeller/gmrender-resurrect
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2020-02-03
PKG_SOURCE_VERSION:=26d8f7edf5336bc30f7334c6ad459bf7f4f90ff2
PKG_MIRROR_HASH:=00f22bae418eafc20dbed5969a54a25121224c0fa118b03188d6bec7af2fdbc7

PKG_MAINTAINER:=
PKG_BUILD_PARALLEL:=1

PKG_FIXUP:=autoreconf
PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk

define Package/gmediarender
	SECTION:=multimedia
	CATEGORY:=Multimedia
	TITLE:=Headless UPnP Renderer
	DEPENDS:=+gstreamer1 +gst1-libav +gst1-plugins-base +gst1-plugins-good +glib2 +libupnp
endef

define Package/gmediarender/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gmediarender $(1)/usr/bin/gmediarender
	$(INSTALL_DIR) $(1)/usr/share/gmediarender
	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gmediarender/*.png $(1)/usr/share/gmediarender/
endef

$(eval $(call BuildPackage,gmediarender))
